<template>
	<view style="padding: 0 30rpx;">
		<view class="list" v-for="(item,index) in list">
			<view
				style="font-weight: bold;display: flex;justify-content: space-between;border-bottom: #cbcbcb 1rpx solid;">
				<text>星宇大厦B2栋</text>
			</view>
			<view style="border-bottom: #cbcbcb 1rpx solid;margin-right: 60rpx;">邀请人：{{item.username}}
			</view>
			<view style="border-bottom: #cbcbcb 1rpx solid;margin-right: 60rpx;">
				访问时间：{{$u.timeFormat(item.jstime, 'yyyy-mm-dd hh:MM')}}</view>
			<view style="border-bottom: #cbcbcb 1rpx solid;margin-right: 130rpx;">拜访人：{{item.bfname}}
			</view>
			<view style="text-align: end;">
				<text @click="toInvitationDetails(index)" style="color: #007AFF;font-weight: bold;">查看详情</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					time: '1657611827182',
					jstime: '1657611827182',
					state: 0,
					username: '张三',
					phone: '12313214575',
					bfname: '李四',
					bm: '市场营销部'
				}, {
					time: '1657611827182',
					jstime: '1657611827182',
					state: 1,
					username: '张三',
					phone: '12313214575',
					bfname: '李四',
					bm: '市场营销部'
				}, {
					time: '1657611827182',
					jstime: '1657611827182',
					state: 2,
					username: '张三',
					phone: '12313214575',
					bfname: '李四',
					bm: '市场营销部'
				}, {
					time: '1657611827182',
					jstime: '1657611827182',
					state: 3,
					username: '张三',
					phone: '12313214575',
					bfname: '李四',
					bm: '市场营销部'
				}]
			}
		},
		methods: {
			toInvitationDetails(index) {
				uni.navigateTo({
					url: './visitDetails'
				})
			}
		}
	}
</script>

<style>
	.list {
		border-radius: 30rpx;
		padding: 20rpx 30rpx;
		box-shadow: 0 0 100rpx #25d0ff;
		margin: 30rpx 0;
		line-height: 80rpx;
	}

	.state0 {
		color: #d99100;
	}

	.state1 {
		color: #48d96a;
	}

	.state2 {
		color: #ff0000;
	}

	.state3 {
		color: #a49fa3;
	}
</style>
